#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define MAX 256
typedef struct queuenode{
	char data;
	struct queuenode* next;
}queuenode;

typedef struct{
	queuenode *front;
	queuenode *rear;
}queue;

void initqueue(queue *q)
{
	q->front=q->rear=NULL;
}

void inqueue(queue *q,char data)
{
	queuenode* newnode=(queuenode*)malloc(sizeof(queuenode));
	newnode->data=data;
	newnode->next=NULL;
	if(q->rear==NULL)
	{
		q->front=q->rear=newnode;
		return;
	}
	q->rear->next=newnode;
	q->rear=newnode;
}
int isempty(queue *q)
{
	return q->front==NULL;
}
char top(queue *q)
{
	if(isempty(q))
	{
		return '\0';
	}
	return q->front->data;
}

int stack[MAX];
char findfirst(char *str)
{
	queue q;
	initqueue(&q);
	for(int i=0;i<MAX;i++)
	{
		stack[i]=0;
	}
	for(int i=0;str[i]!='\0';i++)
	{
		char ch=str[i];
		inqueue(&q,ch);
		stack[ch]++;
	}
	while(!isempty(&q))
	{
		char ch=top(&q);
		if(stack[ch]==1)
		{
			return ch;
		}
		queuenode *temp=q.front;
		q.front=q.front->next;
		if(q.front==NULL)
		{
			q.rear=NULL;
		}
		free(temp);
	}
	return '\0';
}

int main()
{
	char str[100];
	scanf("%s",str);
	char result=findfirst(str);
	if(result!='\0')
	{
		printf("%c\n",result);
	}
	return 0;
}
